const devConfig = require('./build/webpack.config.dev');
const prodConfig = require('./build/webpack.config.prod');
const sitConfig = require('./build/webpack.config.sit');
const analyzeConfig = require('./build/webpack.config.analyze');

const getConfig = (env) => {
    console.log(`*******************构建${env.mode} start*******************`);
    if (env.mode === 'analyze') {
        return analyzeConfig(env);
    }
    if (env.mode === 'development') {
        return devConfig(env);
    }
    if (env.mode === 'sit') {
        return sitConfig(env);
    }
    return prodConfig(env);
};

module.exports = getConfig;
